/**
 * 请求HTML源代码并将返回 body 标签内的内容
 * @date 2020-08-18
 * @param {String} url HTML网页 URL
 * @returns {String} 返回 body 字符串
 */
function GetHTML(url) {
  return new Promise((resolve, reject) => {
    fetch(url)
      .then((res) => res.text())
      .then((res) => resolve(res.match(/(?<=<body[\s\S]*?>)[\s\S]+(?=<\/body>)/g)[0]))
      .catch((rej) => reject(rej));
  });
}
